/*----------------------------------------------------------------------------------------
*
*  Copyright 2019, Gao Hai Hui, <fromzeropoint@126.com>.  All rights reserved.
*  https://gitee.com/helloworldghh/xoskit.git
*  Use of this source code is governed by a MIT license
*  that can be found in the License file.
*
----------------------------------------------------------------------------------------*/
#ifndef __42084F7C_88EE_4c32_B73C_0331C2D6EAC0__
#define __42084F7C_88EE_4c32_B73C_0331C2D6EAC0__

#include "../tools/head.h"
#include "property_template.h"

//////////////////////////////////////////////////////////////////////////////////////////////////
// 

namespace xos_box
{

    class i_variant;

    class str_property_impl : public xos_stl::mem_item< xos::release_impl< str_property_impl >, thread_lock >,
        public property_template<i_str_property, std::string, const char *>
    {
    public:
        typedef property_template<i_str_property, std::string, const char *> BASE;
        typedef xos::release_impl< str_property_impl > T;

    public:
        /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        //
        static int get_xos_item_data( ITEM_DATA *& item_ptr );

    public:
        str_property_impl();
        ~str_property_impl();

    public:
        i_variant * next( const char ** ppKey, char * lpszKey, int nBufSize, int * lpnSizeNeeded );

    protected:
        int init_data();

    public:
        int init();
        int term();

    };

} // xos_box

#endif // __42084F7C_88EE_4c32_B73C_0331C2D6EAC0__
